package com.ibm.spatiotemp.server.config;

import org.apache.log4j.Logger;

import com.ibm.spatiotemp.job.IndexJobRunner;
import com.ibm.spatiotemp.server.connections.DynamodbConnection;
import com.ibm.spatiotemp.utils.StringEncoder;

public class LocalConfig {
	public static Logger logger = Logger.getLogger(LocalConfig.class);

	public static String TENANT_STORE_CLASS = "mocking";
	
	/*can be informix, mysql, hsql, or dynamodb*/
	public static String DEMO_BACKEND_DB_CLASS = "hsql";
	
	public static int Dynamodb_runningMode = DynamodbConnection.LocalMode;

	/*redis cached key's expired time, by default 5 seconds, unit second*/
	public static int CacheExprieTime = 500;
	public static boolean NeedLoadToCache = true;
	
	
	public static final String DefaultBackendServerConfigFilePath = "conf/backendinit.conf";

	public static String MEMCACHECLASS = "redis";

	public static String RequestTopic = "test.req";
	//	public static String ResponseTopic = "test.rep";

	public static String INDEXSERVERID = "test.idxserver";
	
	public static long DefaultIndexTimeRangeScale = 1*24*3600;

	/*index building level*/
	public static final int IDX_JOBMODE = IndexJobRunner.JOBMODE_LOCAL;
	
	/*query running level*/
	public static int RunningLevel_Debug = 0;
	public static int RunningLevel_Real = 1;
	public static int RunningLevel  = 0;

	/**
	 * real case: end with "/"
	 */
	public static String HDFSPrefix = "";
	/**
	 * %s[0]: datasource, %s[1]:timerangemark
	 */
	public static String IndexPathFormat1stLayer = LocalConfig.HDFSPrefix + "%s/rtree_1st/%s/data_00001.tree";
	/**
	 *  %s[0]: datasource, %s[1]: modid %s[2]:timerangemark
	 */
	public static String IndexPathFormat2ndLayer = LocalConfig.HDFSPrefix + "%s/rtree_2nd/%s/%s/data_00001.tree";
	public static String RtreePath4Debug = HDFSPrefix + "mockdatasrc/rtree_2nd/1/16525/data_00001.rtree";
	
	public static boolean EnableCompression = false;
	public static String codecClassname = StringEncoder.codecClassname_gzip;
	public static String String_Class = "utf-8";
	
	
}
